sending messages
To send a message means to call a window function, a grid function, or any other function
designed to take window and/or grid messages.
To send a message to a window means to call the window function associated with the window
argument in the message.
To send a message to a grid means to call the grid function associated with the grid
argument in the message.
To think of "sending a message to a grid" may seem strange at first, since
sending messages is not part of the programming language. But "send message" is
a lot more compact than "look up the window or grid function assigned to the window
or grid argument in the message and call the function, passing the message
arguments".
When you write GuiDesigner programs, you'll find the notion of sending a message is
practically indespensible.
program-wide messages
Sending messages to windows and grids simplifies the structure of a program by directing
messages to only that part of a program that is designed to handle it. But certain events
are important or relevant to all or most parts of a program.
For example, many programs display a set of function keys that are supposed to perform
certain functions whenever they are pressed, regardless of which window is selected. When
processed by XgrProcessMessages() , however, keyboard messages for function keys are sent
to the same place as any keyboard message - to the window function of the selected window.
Since programs can have several window functions, every window function would have to be
prepared to check for function keys and take appropriate action.
To make it easier for programs to process messages that are relevant to several parts of a
program, GraphicsDesigner lets each program register one CEO function.